<?php
/* @var $this CustomerController */
/* @var $data Customer */
?>

<tr>
    <td>
        <?php echo CHtml::encode($data->name); ?>
    </td>
    <td>
        <?php 
            if (is_array($data->emporg)) {
                $c=count($data->emporg);
                foreach ($data->emporg as $value) {
                    ?>
                    <a href="<?php echo Yii::app()->params['linktel']; ?>admin.php?action=updempform&id=<?php echo $value->id; ?>"><?php echo CHtml::encode($value->name); ?></a>
                    <?php
                    if ($c>1) echo '<br />';
                }
            }
        ?>
    </td>
    <td>
        <?php 
        //CHtml::link(CHtml::encode($u->username),array('user/user/view','id'=>$u->id));
        echo CHtml::link('Добавить',array('emp/addemporg','id'=>$data->id),array('class'=>'btn btn-default'));
        ?>
    </td>
</tr>